/*
 *  ME218_CLUT.h
 *  ArduinoOnXcode
 *
 *  Created by Rick Miley on 3/17/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include <ME218_CLUT.h>

#define	LED_0		0
#define LED_1		1
#define LED_2		3
#define LED_3		7
#define LED_4		13
#define LED_5		25
#define LED_6		50
#define LED_7		80

#define LED_strobe_light_sequence_0x01		0x01
#define LED_shoot_from_left_sequence_0x02	0x02


// =============== compare LED intensity 0x00 ===========

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x00[] = {
	{ 1000,	LED_7,	LED_6,	LED_5,	LED_4,	LED_3,	LED_2,	LED_1,	LED_0 }

};


// ========= strobe light 0x01 ===========
PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x01[] = {
	{ 50,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_7,	LED_0 },
	{ 60,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_6,	LED_0 },
	{ 70,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_5,	LED_0 },
	{ 80,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_4,	LED_0 },
	{ 90,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_3,	LED_0 },
	{ 110,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2,	LED_0 },
	{ 120,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0 },
	{ 1000,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0 },
	{ 120,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0 },
	{ 110,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2,	LED_0 },
	{ 90,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_3,	LED_0 },
	{ 80,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_4,	LED_0 },
	{ 70,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_5,	LED_0 },
	{ 60,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_6,	LED_0 }

};

// =========== shoot from left 0x02 =============	

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x02[] = {
	{ 20,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_7 },
	{ 40,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_6 },
	{ 60,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0,	LED_5 },
	{ 80,	LED_1,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0,	LED_0,	LED_4 },
	{ 100,	LED_1,	LED_0,	LED_0,	LED_1,	LED_0,	LED_0,	LED_0,	LED_3 },
	{ 300,	LED_1,	LED_0,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2 },
	{ 300,	LED_1,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1 },
	{ 1000,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1 },
	{ 300,	LED_1,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1 },
	{ 300,	LED_1,	LED_0,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2 },
	{ 80,	LED_1,	LED_0,	LED_0,	LED_1,	LED_0,	LED_0,	LED_0,	LED_3 },
	{ 60,	LED_1,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0,	LED_0,	LED_4 },
	{ 40,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_0,	LED_5 },
	{ 20,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1,	LED_6 }
	
};

// =================== to be created 0x03 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x03[] = {
	{ 500,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1 },
	{ 500,	LED_0,	LED_2,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2,	LED_0 },
	{ 500,	LED_0,	LED_0,	LED_4,	LED_0,	LED_0,	LED_4,	LED_0,	LED_0 },
	{ 100,	LED_0,	LED_0,	LED_0,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0 },
	{ 100,	LED_0,	LED_0,	LED_0,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0 },
	{ 500,	LED_0,	LED_0,	LED_4,	LED_0,	LED_0,	LED_4,	LED_0,	LED_0 },
	{ 500,	LED_0,	LED_2,	LED_0,	LED_0,	LED_0,	LED_0,	LED_2,	LED_0 },
	{ 500,	LED_1,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_0,	LED_1 }

};

// =================== to be created 0x04 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x04[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x05 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x05[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x06 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x06[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x07 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x07[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x08 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x08[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x09 ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x09[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0a ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0a[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0b ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0b[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0c ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0c[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0d ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0d[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0e ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0e[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};


// =================== to be created 0x0f ============================

PROGMEM_XXX LED_FLASH_data	LED_scratch__sequence_0x0f[] = {
	{ 1000,	LED_7,	LED_7,	LED_7,	LED_7,	LED_0,	LED_0,	LED_0,	LED_0 }
};






// ================= LEDs reserved ===========================

PROGMEM_XXX prog_uint16_t_XXX pgm_LED_Sequence[] = { 
	prog_uint16_t_XXX(&LED_scratch__sequence_0x00),		
	sizeof(LED_scratch__sequence_0x00)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x01),		
	sizeof(LED_scratch__sequence_0x01)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x02),		
	sizeof(LED_scratch__sequence_0x02)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x03),		
	sizeof(LED_scratch__sequence_0x03)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x04),		
	sizeof(LED_scratch__sequence_0x04)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x05),		
	sizeof(LED_scratch__sequence_0x05)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x06),		
	sizeof(LED_scratch__sequence_0x06)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x07),		
	sizeof(LED_scratch__sequence_0x07)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x08),		
	sizeof(LED_scratch__sequence_0x08)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x09),		
	sizeof(LED_scratch__sequence_0x09)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0a),		
	sizeof(LED_scratch__sequence_0x0a)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0b),		
	sizeof(LED_scratch__sequence_0x0b)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0c),		
	sizeof(LED_scratch__sequence_0x0c)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0d),		
	sizeof(LED_scratch__sequence_0x0d)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0e),		
	sizeof(LED_scratch__sequence_0x0e)/sizeof(LED_FLASH_data),
	prog_uint16_t_XXX(&LED_scratch__sequence_0x0f),		
	sizeof(LED_scratch__sequence_0x0f)/sizeof(LED_FLASH_data)
	
};
	
	

// =======================================================



PROGMEM_XXX  CLUT_FLASH_data CLUT_0_sequence[] = {
	{ fixed_CLUT,  MeggyDark } 
} ;


PROGMEM_XXX CLUT_FLASH_data CLUT_1_sequence[] = {
	{ fixed_CLUT,  MeggyRed } 
};

//	100,  MeggyRed,
//	100,  MeggyBlue } ;


PROGMEM_XXX CLUT_FLASH_data CLUT_2_sequence[] = {
	{ fixed_CLUT,  MeggyOrange }
} ;

//	230,  MeggyWhite,
//	160,  MeggyGreen } ;


PROGMEM_XXX CLUT_FLASH_data CLUT_3_sequence[]  = {
	{ fixed_CLUT,  MeggyYellow }
} ;

PROGMEM_XXX CLUT_FLASH_data CLUT_4_sequence[]  = {
	{ fixed_CLUT, MeggyGreen }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_5_sequence[]  = {
	{ fixed_CLUT, MeggyBlue }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_6_sequence[]  = {
	{ 100,  MeggyGreen },
	{ 100,  MeggyAllOn },
	{ 100,  MeggyRed }, 
	{ 100,  MeggyBlue },
	{ 100,  MeggyOrange } 

};

//	20,  MeggyBlue } ;

//fixed_CLUT, MeggyViolet };

PROGMEM_XXX CLUT_FLASH_data CLUT_7_sequence[]  = {
	{ fixed_CLUT, MeggyWhite }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_8_sequence[]  = {
	{ fixed_CLUT, MeggyDimRed }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_9_sequence[]  = {
	{ fixed_CLUT, MeggyDimRed }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_10_sequence[]  = {
	{ fixed_CLUT, MeggyDimGreen }
};

/// CLUT B

PROGMEM_XXX CLUT_FLASH_data CLUT_11_sequence[]  = {
	{ 20,  MeggyGreen },
	{ 20,  MeggyAllOn },
	{ 20,  MeggyRed }, 
	{ 20,  MeggyBlue },
	{ 20,  MeggyOrange },
	{ 20,  MeggyDimYellow },	
	{ 20,  MeggyDimAqua }, 	
	{ 20,  MeggyDimViolet }, 
	{ 20,  MeggyNipple } 
	

};

PROGMEM_XXX CLUT_FLASH_data CLUT_12_sequence[]  = {
	{ fixed_CLUT, MeggyDimYellow }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_13_sequence[]  = {
	{ fixed_CLUT, MeggyDimYellow }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_14_sequence[]  = {
	{ fixed_CLUT, MeggyDimAqua }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_15_sequence[]  = {
	{ 100,  MeggyDimViolet },
	{ 25,  MeggyDark },
	{ 100,  MeggyDimViolet }, 
	{ 25,  MeggyDark },
	{ 100,  MeggyDimViolet },
	{ 25,  MeggyDark },	
	{ 100,  MeggyDimViolet }, 	
	{ 25,  MeggyDark }, 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_16_sequence[]  = {
	{ 1000, MeggyRed },
	{ 1000, MeggyBlue },
	{ 1000, MeggyGreen } 
};


PROGMEM_XXX CLUT_FLASH_data CLUT_17_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_18_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_19_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_20_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_21_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_22_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_23_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_24_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_25_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};

PROGMEM_XXX CLUT_FLASH_data CLUT_26_sequence[]  = {
	{ fixed_CLUT,	MeggyWhite } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_27_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_28_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_29_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_30_sequence[]  = {
	{ fixed_CLUT,	MeggyDark } 
};

PROGMEM_XXX CLUT_FLASH_data CLUT_31_sequence[]  = {
	{ fixed_CLUT,	MeggyDark }
};


// ================= 32 CLUTs reserved ===========================

PROGMEM_XXX prog_uint16_t_XXX pgm_CLUT_Sequence[] = { 
	prog_uint16_t_XXX(&CLUT_0_sequence),		
	sizeof(CLUT_0_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_1_sequence),		
	sizeof(CLUT_1_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_2_sequence),		
	sizeof(CLUT_2_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_3_sequence),		
	sizeof(CLUT_3_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_4_sequence),		
	sizeof(CLUT_4_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_5_sequence),		
	sizeof(CLUT_5_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_6_sequence),		
	sizeof(CLUT_6_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_7_sequence),		
	sizeof(CLUT_7_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_8_sequence),		
	sizeof(CLUT_8_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_9_sequence),		
	sizeof(CLUT_9_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_10_sequence),		
	sizeof(CLUT_10_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_11_sequence),		
	sizeof(CLUT_11_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_12_sequence),		
	sizeof(CLUT_12_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_13_sequence),		
	sizeof(CLUT_13_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_14_sequence),		
	sizeof(CLUT_14_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_15_sequence),		
	sizeof(CLUT_15_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_16_sequence),		
	sizeof(CLUT_16_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_17_sequence),		
	sizeof(CLUT_17_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_18_sequence),		
	sizeof(CLUT_18_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_19_sequence),		
	sizeof(CLUT_19_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_20_sequence),		
	sizeof(CLUT_20_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_21_sequence),		
	sizeof(CLUT_21_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_22_sequence),		
	sizeof(CLUT_22_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_23_sequence),		
	sizeof(CLUT_23_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_24_sequence),		
	sizeof(CLUT_24_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_25_sequence),		
	sizeof(CLUT_25_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_26_sequence),		
	sizeof(CLUT_26_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_27_sequence),		
	sizeof(CLUT_27_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_28_sequence),		
	sizeof(CLUT_28_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_29_sequence),		
	sizeof(CLUT_29_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_30_sequence),		
	sizeof(CLUT_30_sequence)/sizeof(CLUT_FLASH_data),
	prog_uint16_t_XXX(&CLUT_31_sequence),		
	sizeof(CLUT_31_sequence)/sizeof(CLUT_FLASH_data) } ;








